package com.ruoyi.finance.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.api.domain.finance.ReciveReq;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author wangenhao
 * @interfaceName RemoteReciveReqService
 * @description
 * @date 2024-11-07 下午2:23
 */
@FeignClient(contextId = "remoteReciveReqService", value = ServiceNameConstants.FINANCE_SERVICE)
public interface RemoteReciveReqService {

    @PostMapping("/reciveReq")
    public AjaxResult add(@RequestBody ReciveReq reciveReq);

    @PostMapping("/reciveReq/updateStatus")
    public AjaxResult updateReciveStatus(@RequestBody ReciveReq reciveReq);

    /**
     * @return com.ruoyi.common.core.domain.R<com.ruoyi.system.api.domain.finance.ReciveReq>
     * @description 根据财务应收单编号获取详情
     * @date 2024/11/10 下午11:08
     * @Param orderCode:
     **/
    @GetMapping("/reciveReq/info/{orderCode}")
    public R<ReciveReq> getReciveReqByOrderCode(@PathVariable("orderCode") String orderCode);

    /**
     * @return com.ruoyi.common.core.web.domain.AjaxResult
     * @description 根据应收单编号修改，sql语句修改已核销金额
     * @date 2024/11/19 上午9:25
     * @Param reciveReq:
     **/
    @PostMapping("/reciveReq/updateReciveOrderByOrderCodeOfVerMoney")
    AjaxResult updateReciveOrderByOrderCodeOfVerMoney(@RequestBody ReciveReq reciveReq);
}
